//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS LookoutVision service.
///
/// This is the Amazon Lookout for Vision API Reference. It provides descriptions of actions,  data types, common parameters, and common errors. Amazon Lookout for Vision enables you to find visual defects in industrial products, accurately and at scale. It uses computer vision to identify missing components in an industrial product, damage to vehicles or structures, irregularities in production lines, and even minuscule defects in silicon wafers — or any other physical item where quality is important such as a missing capacitor on printed circuit boards.
public struct LookoutVision: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the LookoutVision client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "LookoutVision",
            serviceIdentifier: "lookoutvision",
            serviceProtocol: .restjson,
            apiVersion: "2020-11-20",
            endpoint: endpoint,
            errorType: LookoutVisionErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Creates a new dataset  in an Amazon Lookout for Vision project. CreateDataset can create a  training or a test dataset from a valid dataset source (DatasetSource). If you want a single dataset project, specify train for the value of  DatasetType. To have a project with separate training and test datasets, call CreateDataset twice. On the first call, specify train for the value of  DatasetType. On the second call, specify test for the value of  DatasetType.  This operation requires permissions to perform the lookoutvision:CreateDataset operation.
    @Sendable
    @inlinable
    public func createDataset(_ input: CreateDatasetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDatasetResponse {
        try await self.client.execute(
            operation: "CreateDataset", 
            path: "/2020-11-20/projects/{ProjectName}/datasets", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new dataset  in an Amazon Lookout for Vision project. CreateDataset can create a  training or a test dataset from a valid dataset source (DatasetSource). If you want a single dataset project, specify train for the value of  DatasetType. To have a project with separate training and test datasets, call CreateDataset twice. On the first call, specify train for the value of  DatasetType. On the second call, specify test for the value of  DatasetType.  This operation requires permissions to perform the lookoutvision:CreateDataset operation.
    ///
    /// Parameters:
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to CreateDataset completes only once.  You choose the value to pass. For example, An issue might prevent you from getting a response from CreateDataset. In this case, safely retry your call to CreateDataset by using the same ClientToken parameter value. If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from making multiple dataset creation requests. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to CreateDataset. An idempotency token is active for 8 hours.
    ///   - datasetSource: The location of the manifest file that Amazon Lookout for Vision uses to create the dataset. If you don't specify DatasetSource, an empty dataset is created and the operation  synchronously returns. Later, you can add JSON Lines by calling UpdateDatasetEntries.  If you specify a value for DataSource, the manifest at the S3 location is validated and used to create the dataset. The call to CreateDataset is asynchronous and might take a while to complete. To find out the current status, Check the value of Status returned in a call to DescribeDataset.
    ///   - datasetType: The type of the dataset. Specify train for a training dataset. Specify test for a test dataset.
    ///   - projectName: The name of the project in which you want to create a dataset.
    ///   - logger: Logger use during operation
    @inlinable
    public func createDataset(
        clientToken: String? = CreateDatasetRequest.idempotencyToken(),
        datasetSource: DatasetSource? = nil,
        datasetType: String? = nil,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDatasetResponse {
        let input = CreateDatasetRequest(
            clientToken: clientToken, 
            datasetSource: datasetSource, 
            datasetType: datasetType, 
            projectName: projectName
        )
        return try await self.createDataset(input, logger: logger)
    }

    /// Creates a new version of a model within an an Amazon Lookout for Vision project.  CreateModel is an asynchronous operation in which Amazon Lookout for Vision trains, tests, and evaluates a new version of a model.  To get the current status, check the Status field returned in the response from DescribeModel. If the project has a single dataset, Amazon Lookout for Vision internally splits the dataset to create a training and a test dataset.   If the project has a training and a test dataset, Lookout for Vision uses the respective datasets to train and test  the model.  After training completes, the evaluation metrics are stored at the location specified in OutputConfig.   This operation requires permissions to perform the lookoutvision:CreateModel operation. If you want to tag your model, you also require permission to the lookoutvision:TagResource operation.
    @Sendable
    @inlinable
    public func createModel(_ input: CreateModelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateModelResponse {
        try await self.client.execute(
            operation: "CreateModel", 
            path: "/2020-11-20/projects/{ProjectName}/models", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new version of a model within an an Amazon Lookout for Vision project.  CreateModel is an asynchronous operation in which Amazon Lookout for Vision trains, tests, and evaluates a new version of a model.  To get the current status, check the Status field returned in the response from DescribeModel. If the project has a single dataset, Amazon Lookout for Vision internally splits the dataset to create a training and a test dataset.   If the project has a training and a test dataset, Lookout for Vision uses the respective datasets to train and test  the model.  After training completes, the evaluation metrics are stored at the location specified in OutputConfig.   This operation requires permissions to perform the lookoutvision:CreateModel operation. If you want to tag your model, you also require permission to the lookoutvision:TagResource operation.
    ///
    /// Parameters:
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to CreateModel completes only once.  You choose the value to pass. For example, An issue might prevent you from getting a response from CreateModel. In this case, safely retry your call to CreateModel by using the same ClientToken parameter value.  If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from starting multiple training jobs. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to CreateModel. An idempotency token is active for 8 hours.
    ///   - description: A description for the version of the model.
    ///   - kmsKeyId: The identifier for your AWS KMS key. The key is used to encrypt training and test images copied into the service for model training. Your  source images are unaffected. If this parameter is not specified, the copied images are encrypted by a key that AWS owns and manages.
    ///   - outputConfig: The location where Amazon Lookout for Vision saves the training results.
    ///   - projectName: The name of the project in which you want to create a model version.
    ///   - tags: A set of tags (key-value pairs) that you want to attach to the model.
    ///   - logger: Logger use during operation
    @inlinable
    public func createModel(
        clientToken: String? = CreateModelRequest.idempotencyToken(),
        description: String? = nil,
        kmsKeyId: String? = nil,
        outputConfig: OutputConfig? = nil,
        projectName: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateModelResponse {
        let input = CreateModelRequest(
            clientToken: clientToken, 
            description: description, 
            kmsKeyId: kmsKeyId, 
            outputConfig: outputConfig, 
            projectName: projectName, 
            tags: tags
        )
        return try await self.createModel(input, logger: logger)
    }

    /// Creates an empty Amazon Lookout for Vision project. After you create the project, add a dataset by calling CreateDataset. This operation requires permissions to perform the lookoutvision:CreateProject operation.
    @Sendable
    @inlinable
    public func createProject(_ input: CreateProjectRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateProjectResponse {
        try await self.client.execute(
            operation: "CreateProject", 
            path: "/2020-11-20/projects", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates an empty Amazon Lookout for Vision project. After you create the project, add a dataset by calling CreateDataset. This operation requires permissions to perform the lookoutvision:CreateProject operation.
    ///
    /// Parameters:
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to CreateProject completes only once.  You choose the value to pass. For example, An issue might prevent you from  getting a response from CreateProject. In this case, safely retry your call to CreateProject by using the same ClientToken parameter value.  If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from making multiple project creation requests. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to CreateProject. An idempotency token is active for 8 hours.
    ///   - projectName: The name for the project.
    ///   - logger: Logger use during operation
    @inlinable
    public func createProject(
        clientToken: String? = CreateProjectRequest.idempotencyToken(),
        projectName: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateProjectResponse {
        let input = CreateProjectRequest(
            clientToken: clientToken, 
            projectName: projectName
        )
        return try await self.createProject(input, logger: logger)
    }

    /// Deletes an existing Amazon Lookout for Vision dataset.  If your the project has a single dataset, you must create a new dataset before you can create a model. If you project has a training dataset and a test dataset consider the following.    If you delete the test dataset, your project reverts to a single dataset project. If you then train the model, Amazon Lookout for Vision internally splits the remaining dataset into a training and test dataset.   If you delete the training dataset, you must create a training dataset before you can create a model.   This operation requires permissions to perform the lookoutvision:DeleteDataset operation.
    @Sendable
    @inlinable
    public func deleteDataset(_ input: DeleteDatasetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteDatasetResponse {
        try await self.client.execute(
            operation: "DeleteDataset", 
            path: "/2020-11-20/projects/{ProjectName}/datasets/{DatasetType}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an existing Amazon Lookout for Vision dataset.  If your the project has a single dataset, you must create a new dataset before you can create a model. If you project has a training dataset and a test dataset consider the following.    If you delete the test dataset, your project reverts to a single dataset project. If you then train the model, Amazon Lookout for Vision internally splits the remaining dataset into a training and test dataset.   If you delete the training dataset, you must create a training dataset before you can create a model.   This operation requires permissions to perform the lookoutvision:DeleteDataset operation.
    ///
    /// Parameters:
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to DeleteDataset completes only once.  You choose the value to pass. For example, An issue might prevent you from getting a response from DeleteDataset. In this case, safely retry your call to DeleteDataset by using the same ClientToken parameter value.  If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from making multiple deletetion requests. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to DeleteDataset. An idempotency token is active for 8 hours.
    ///   - datasetType: The type of the dataset to delete. Specify train to delete the training dataset. Specify test to delete the test dataset. To delete the dataset in a single dataset project,  specify train.
    ///   - projectName: The name of the project that contains the dataset that you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteDataset(
        clientToken: String? = DeleteDatasetRequest.idempotencyToken(),
        datasetType: String,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteDatasetResponse {
        let input = DeleteDatasetRequest(
            clientToken: clientToken, 
            datasetType: datasetType, 
            projectName: projectName
        )
        return try await self.deleteDataset(input, logger: logger)
    }

    /// Deletes an Amazon Lookout for Vision model. You can't delete a running model. To stop a running model, use the StopModel operation. It might take a few seconds to delete a model. To determine if a model has been deleted, call ListModels and check if the version of the model (ModelVersion) is in the Models array.   This operation requires permissions to perform the lookoutvision:DeleteModel operation.
    @Sendable
    @inlinable
    public func deleteModel(_ input: DeleteModelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteModelResponse {
        try await self.client.execute(
            operation: "DeleteModel", 
            path: "/2020-11-20/projects/{ProjectName}/models/{ModelVersion}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an Amazon Lookout for Vision model. You can't delete a running model. To stop a running model, use the StopModel operation. It might take a few seconds to delete a model. To determine if a model has been deleted, call ListModels and check if the version of the model (ModelVersion) is in the Models array.   This operation requires permissions to perform the lookoutvision:DeleteModel operation.
    ///
    /// Parameters:
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to DeleteModel completes only once.  You choose the value to pass. For example, an issue might prevent you from getting a response from DeleteModel. In this case, safely retry your call to DeleteModel by using the same ClientToken parameter value. If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from making multiple model deletion requests. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to DeleteModel. An idempotency token is active for 8 hours.
    ///   - modelVersion: The version of the model that you want to delete.
    ///   - projectName: The name of the project that contains the model that you want to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteModel(
        clientToken: String? = DeleteModelRequest.idempotencyToken(),
        modelVersion: String,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteModelResponse {
        let input = DeleteModelRequest(
            clientToken: clientToken, 
            modelVersion: modelVersion, 
            projectName: projectName
        )
        return try await self.deleteModel(input, logger: logger)
    }

    /// Deletes an Amazon Lookout for Vision project. To delete a project, you must first delete each version of the model associated with  the project. To delete a model use the DeleteModel operation. You also have to delete the dataset(s) associated with the model. For more information, see  DeleteDataset.  The images referenced by the training and test datasets aren't deleted.   This operation requires permissions to perform the lookoutvision:DeleteProject operation.
    @Sendable
    @inlinable
    public func deleteProject(_ input: DeleteProjectRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteProjectResponse {
        try await self.client.execute(
            operation: "DeleteProject", 
            path: "/2020-11-20/projects/{ProjectName}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes an Amazon Lookout for Vision project. To delete a project, you must first delete each version of the model associated with  the project. To delete a model use the DeleteModel operation. You also have to delete the dataset(s) associated with the model. For more information, see  DeleteDataset.  The images referenced by the training and test datasets aren't deleted.   This operation requires permissions to perform the lookoutvision:DeleteProject operation.
    ///
    /// Parameters:
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to DeleteProject completes only once.  You choose the value to pass. For example, An issue might prevent you from getting a response from DeleteProject. In this case, safely retry your call to DeleteProject by using the same ClientToken parameter value.  If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from making multiple project deletion requests. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to DeleteProject. An idempotency token is active for 8 hours.
    ///   - projectName: The name of the project to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteProject(
        clientToken: String? = DeleteProjectRequest.idempotencyToken(),
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteProjectResponse {
        let input = DeleteProjectRequest(
            clientToken: clientToken, 
            projectName: projectName
        )
        return try await self.deleteProject(input, logger: logger)
    }

    /// Describe an Amazon Lookout for Vision dataset. This operation requires permissions to perform the lookoutvision:DescribeDataset operation.
    @Sendable
    @inlinable
    public func describeDataset(_ input: DescribeDatasetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeDatasetResponse {
        try await self.client.execute(
            operation: "DescribeDataset", 
            path: "/2020-11-20/projects/{ProjectName}/datasets/{DatasetType}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describe an Amazon Lookout for Vision dataset. This operation requires permissions to perform the lookoutvision:DescribeDataset operation.
    ///
    /// Parameters:
    ///   - datasetType: The type of the dataset to describe. Specify train to describe the  training dataset. Specify test to describe the test dataset. If you have a single dataset project, specify train
    ///   - projectName: The name of the project that contains the dataset that you want to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeDataset(
        datasetType: String,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeDatasetResponse {
        let input = DescribeDatasetRequest(
            datasetType: datasetType, 
            projectName: projectName
        )
        return try await self.describeDataset(input, logger: logger)
    }

    /// Describes a version of an Amazon Lookout for Vision model. This operation requires permissions to perform the lookoutvision:DescribeModel operation.
    @Sendable
    @inlinable
    public func describeModel(_ input: DescribeModelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeModelResponse {
        try await self.client.execute(
            operation: "DescribeModel", 
            path: "/2020-11-20/projects/{ProjectName}/models/{ModelVersion}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes a version of an Amazon Lookout for Vision model. This operation requires permissions to perform the lookoutvision:DescribeModel operation.
    ///
    /// Parameters:
    ///   - modelVersion: The version of the model that you want to describe.
    ///   - projectName: The project that contains the version of a model that you want to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeModel(
        modelVersion: String,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeModelResponse {
        let input = DescribeModelRequest(
            modelVersion: modelVersion, 
            projectName: projectName
        )
        return try await self.describeModel(input, logger: logger)
    }

    /// Describes an Amazon Lookout for Vision model packaging job.
    ///  This operation requires permissions to perform the lookoutvision:DescribeModelPackagingJob operation. For more information, see  Using your Amazon Lookout for Vision model on an edge device in the  Amazon Lookout for Vision Developer Guide.
    @Sendable
    @inlinable
    public func describeModelPackagingJob(_ input: DescribeModelPackagingJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeModelPackagingJobResponse {
        try await self.client.execute(
            operation: "DescribeModelPackagingJob", 
            path: "/2020-11-20/projects/{ProjectName}/modelpackagingjobs/{JobName}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes an Amazon Lookout for Vision model packaging job.
    ///  This operation requires permissions to perform the lookoutvision:DescribeModelPackagingJob operation. For more information, see  Using your Amazon Lookout for Vision model on an edge device in the  Amazon Lookout for Vision Developer Guide.
    ///
    /// Parameters:
    ///   - jobName: The job name for the model packaging job.
    ///   - projectName: The name of the project that contains the model packaging job that you want to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeModelPackagingJob(
        jobName: String,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeModelPackagingJobResponse {
        let input = DescribeModelPackagingJobRequest(
            jobName: jobName, 
            projectName: projectName
        )
        return try await self.describeModelPackagingJob(input, logger: logger)
    }

    /// Describes an Amazon Lookout for Vision project. This operation requires permissions to perform the lookoutvision:DescribeProject operation.
    @Sendable
    @inlinable
    public func describeProject(_ input: DescribeProjectRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeProjectResponse {
        try await self.client.execute(
            operation: "DescribeProject", 
            path: "/2020-11-20/projects/{ProjectName}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes an Amazon Lookout for Vision project. This operation requires permissions to perform the lookoutvision:DescribeProject operation.
    ///
    /// Parameters:
    ///   - projectName: The name of the project that you want to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeProject(
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeProjectResponse {
        let input = DescribeProjectRequest(
            projectName: projectName
        )
        return try await self.describeProject(input, logger: logger)
    }

    /// Detects anomalies in an image that you supply.  The response from DetectAnomalies includes a boolean prediction that the image contains one or more anomalies and a confidence value for the prediction. If the model is an image segmentation model, the response also includes segmentation information for each type of anomaly found in the image.  Before calling DetectAnomalies, you must first start your model with the StartModel operation. You are charged for the amount of time, in minutes, that a model runs and for the number of anomaly detection units that your model uses. If you are not using a model, use the StopModel operation to stop your model.   For more information, see Detecting anomalies in an image in the Amazon Lookout for Vision developer guide. This operation requires permissions to perform the lookoutvision:DetectAnomalies operation.
    @Sendable
    @inlinable
    public func detectAnomalies(_ input: DetectAnomaliesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DetectAnomaliesResponse {
        try await self.client.execute(
            operation: "DetectAnomalies", 
            path: "/2020-11-20/projects/{ProjectName}/models/{ModelVersion}/detect", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Detects anomalies in an image that you supply.  The response from DetectAnomalies includes a boolean prediction that the image contains one or more anomalies and a confidence value for the prediction. If the model is an image segmentation model, the response also includes segmentation information for each type of anomaly found in the image.  Before calling DetectAnomalies, you must first start your model with the StartModel operation. You are charged for the amount of time, in minutes, that a model runs and for the number of anomaly detection units that your model uses. If you are not using a model, use the StopModel operation to stop your model.   For more information, see Detecting anomalies in an image in the Amazon Lookout for Vision developer guide. This operation requires permissions to perform the lookoutvision:DetectAnomalies operation.
    ///
    /// Parameters:
    ///   - body: The unencrypted image bytes that you want to analyze.
    ///   - contentType: The type of the image passed in Body. Valid values are image/png (PNG format images) and image/jpeg (JPG format images).
    ///   - modelVersion: The version of the model that you want to use.
    ///   - projectName: The name of the project that contains the model version that you want to use.
    ///   - logger: Logger use during operation
    @inlinable
    public func detectAnomalies(
        body: AWSHTTPBody? = nil,
        contentType: String? = nil,
        modelVersion: String,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DetectAnomaliesResponse {
        let input = DetectAnomaliesRequest(
            body: body, 
            contentType: contentType, 
            modelVersion: modelVersion, 
            projectName: projectName
        )
        return try await self.detectAnomalies(input, logger: logger)
    }

    /// Lists the JSON Lines within a dataset. An Amazon Lookout for Vision JSON Line contains the anomaly information for a single image, including the image location and the assigned label. This operation requires permissions to perform the lookoutvision:ListDatasetEntries operation.
    @Sendable
    @inlinable
    public func listDatasetEntries(_ input: ListDatasetEntriesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDatasetEntriesResponse {
        try await self.client.execute(
            operation: "ListDatasetEntries", 
            path: "/2020-11-20/projects/{ProjectName}/datasets/{DatasetType}/entries", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the JSON Lines within a dataset. An Amazon Lookout for Vision JSON Line contains the anomaly information for a single image, including the image location and the assigned label. This operation requires permissions to perform the lookoutvision:ListDatasetEntries operation.
    ///
    /// Parameters:
    ///   - afterCreationDate: Only includes entries after the specified date in the response. For example, 2020-06-23T00:00:00.
    ///   - anomalyClass: Specify normal to include only normal images. Specify anomaly to only include anomalous entries. If you don't specify a value, Amazon Lookout for Vision returns normal and anomalous images.
    ///   - beforeCreationDate: Only includes entries before the specified date in the response. For example, 2020-06-23T00:00:00.
    ///   - datasetType: The type of the dataset that you want to list.  Specify train to list  the training dataset. Specify test to list the test dataset. If you have a single dataset project, specify train.
    ///   - labeled: Specify true to include labeled entries, otherwise specify false. If you don't specify a value, Lookout for Vision returns all entries.
    ///   - maxResults: The maximum number of results to return per paginated call. The largest value you can specify is 100.  If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
    ///   - nextToken: If the previous response was incomplete (because there is more data to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of dataset entries.
    ///   - projectName: The name of the project that contains the dataset that you want to list.
    ///   - sourceRefContains: Perform a "contains" search on the  values of the source-ref key within the dataset.  For example a value of "IMG_17"  returns all JSON Lines where the source-ref key value matches *IMG_17*.
    ///   - logger: Logger use during operation
    @inlinable
    public func listDatasetEntries(
        afterCreationDate: Date? = nil,
        anomalyClass: String? = nil,
        beforeCreationDate: Date? = nil,
        datasetType: String,
        labeled: Bool? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        projectName: String,
        sourceRefContains: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDatasetEntriesResponse {
        let input = ListDatasetEntriesRequest(
            afterCreationDate: afterCreationDate, 
            anomalyClass: anomalyClass, 
            beforeCreationDate: beforeCreationDate, 
            datasetType: datasetType, 
            labeled: labeled, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            projectName: projectName, 
            sourceRefContains: sourceRefContains
        )
        return try await self.listDatasetEntries(input, logger: logger)
    }

    /// Lists the model packaging jobs created for an Amazon Lookout for Vision project.
    ///  This operation requires permissions to perform the lookoutvision:ListModelPackagingJobs operation.
    ///  For more information, see  Using your Amazon Lookout for Vision model on an edge device in the  Amazon Lookout for Vision Developer Guide.
    @Sendable
    @inlinable
    public func listModelPackagingJobs(_ input: ListModelPackagingJobsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListModelPackagingJobsResponse {
        try await self.client.execute(
            operation: "ListModelPackagingJobs", 
            path: "/2020-11-20/projects/{ProjectName}/modelpackagingjobs", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the model packaging jobs created for an Amazon Lookout for Vision project.
    ///  This operation requires permissions to perform the lookoutvision:ListModelPackagingJobs operation.
    ///  For more information, see  Using your Amazon Lookout for Vision model on an edge device in the  Amazon Lookout for Vision Developer Guide.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return per paginated call. The largest value you can specify is 100.  If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
    ///   - nextToken: If the previous response was incomplete (because there is more results to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination  token to retrieve the next set of results.
    ///   - projectName: The name of the project for which you want to list the model packaging jobs.
    ///   - logger: Logger use during operation
    @inlinable
    public func listModelPackagingJobs(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListModelPackagingJobsResponse {
        let input = ListModelPackagingJobsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            projectName: projectName
        )
        return try await self.listModelPackagingJobs(input, logger: logger)
    }

    /// Lists the versions of a model in an Amazon Lookout for Vision project. The ListModels operation is eventually consistent.   Recent calls to CreateModel might take a while to appear in the response from ListProjects. This operation requires permissions to perform the lookoutvision:ListModels operation.
    @Sendable
    @inlinable
    public func listModels(_ input: ListModelsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListModelsResponse {
        try await self.client.execute(
            operation: "ListModels", 
            path: "/2020-11-20/projects/{ProjectName}/models", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the versions of a model in an Amazon Lookout for Vision project. The ListModels operation is eventually consistent.   Recent calls to CreateModel might take a while to appear in the response from ListProjects. This operation requires permissions to perform the lookoutvision:ListModels operation.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return per paginated call. The largest value you can specify is 100.  If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
    ///   - nextToken: If the previous response was incomplete (because there is more data to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of models.
    ///   - projectName: The name of the project that contains the model versions that you want to list.
    ///   - logger: Logger use during operation
    @inlinable
    public func listModels(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListModelsResponse {
        let input = ListModelsRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            projectName: projectName
        )
        return try await self.listModels(input, logger: logger)
    }

    /// Lists the Amazon Lookout for Vision projects in your AWS account that are in the AWS Region in  which you call ListProjects. The ListProjects operation is eventually consistent.   Recent calls to CreateProject and DeleteProject might take a while to appear in the response from ListProjects. This operation requires permissions to perform the lookoutvision:ListProjects operation.
    @Sendable
    @inlinable
    public func listProjects(_ input: ListProjectsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListProjectsResponse {
        try await self.client.execute(
            operation: "ListProjects", 
            path: "/2020-11-20/projects", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the Amazon Lookout for Vision projects in your AWS account that are in the AWS Region in  which you call ListProjects. The ListProjects operation is eventually consistent.   Recent calls to CreateProject and DeleteProject might take a while to appear in the response from ListProjects. This operation requires permissions to perform the lookoutvision:ListProjects operation.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results to return per paginated call. The largest value you can specify is 100.  If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
    ///   - nextToken: If the previous response was incomplete (because there is more data to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of projects.
    ///   - logger: Logger use during operation
    @inlinable
    public func listProjects(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListProjectsResponse {
        let input = ListProjectsRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listProjects(input, logger: logger)
    }

    /// Returns a list of tags attached to the specified Amazon Lookout for Vision model. This operation requires permissions to perform the lookoutvision:ListTagsForResource operation.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/2020-11-20/tags/{ResourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of tags attached to the specified Amazon Lookout for Vision model. This operation requires permissions to perform the lookoutvision:ListTagsForResource operation.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the model for which you want to list tags.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Starts the running of the version of an Amazon Lookout for Vision model. Starting a model takes a while to complete. To check the current state of the model, use DescribeModel. A model is ready to use when its status is HOSTED. Once the model is running, you can detect custom labels in new images by calling  DetectAnomalies.  You are charged for the amount of time that the model is running. To stop a running model, call StopModel.  This operation requires permissions to perform the lookoutvision:StartModel operation.
    @Sendable
    @inlinable
    public func startModel(_ input: StartModelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartModelResponse {
        try await self.client.execute(
            operation: "StartModel", 
            path: "/2020-11-20/projects/{ProjectName}/models/{ModelVersion}/start", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Starts the running of the version of an Amazon Lookout for Vision model. Starting a model takes a while to complete. To check the current state of the model, use DescribeModel. A model is ready to use when its status is HOSTED. Once the model is running, you can detect custom labels in new images by calling  DetectAnomalies.  You are charged for the amount of time that the model is running. To stop a running model, call StopModel.  This operation requires permissions to perform the lookoutvision:StartModel operation.
    ///
    /// Parameters:
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to StartModel completes only once.  You choose the value to pass. For example, An issue might prevent  you from getting a response from StartModel. In this case, safely retry your call to StartModel by using the same ClientToken parameter value.  If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from making multiple start requests. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to StartModel. An idempotency token is active for 8 hours.
    ///   - maxInferenceUnits: The maximum number of inference units to use for auto-scaling the model. If you don't specify a value, Amazon Lookout for Vision doesn't auto-scale the model.
    ///   - minInferenceUnits: The minimum number of inference units to use. A single inference unit represents 1 hour of processing.  Use a higher number to increase the TPS throughput of your model. You are charged for the number of inference units that you use.
    ///   - modelVersion: The version of the model that you want to start.
    ///   - projectName: The name of the project that contains the model that you want to start.
    ///   - logger: Logger use during operation
    @inlinable
    public func startModel(
        clientToken: String? = StartModelRequest.idempotencyToken(),
        maxInferenceUnits: Int? = nil,
        minInferenceUnits: Int? = nil,
        modelVersion: String,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartModelResponse {
        let input = StartModelRequest(
            clientToken: clientToken, 
            maxInferenceUnits: maxInferenceUnits, 
            minInferenceUnits: minInferenceUnits, 
            modelVersion: modelVersion, 
            projectName: projectName
        )
        return try await self.startModel(input, logger: logger)
    }

    /// Starts an Amazon Lookout for Vision model packaging job. A model packaging job creates an AWS IoT Greengrass component for a Lookout for Vision model. You can use the component to deploy your model to an edge device managed by Greengrass.
    ///  Use the DescribeModelPackagingJob API to determine the current status of the job.  The model packaging job is complete if the value of Status is SUCCEEDED. To deploy the component to the target device, use the component name and component version with the AWS IoT Greengrass CreateDeployment API. This operation requires the following permissions:    lookoutvision:StartModelPackagingJob     s3:PutObject     s3:GetBucketLocation     kms:GenerateDataKey     greengrass:CreateComponentVersion     greengrass:DescribeComponent    (Optional) greengrass:TagResource. Only required if you want to tag the component.   For more information, see  Using your Amazon Lookout for Vision model on an edge device in the  Amazon Lookout for Vision Developer Guide.
    @Sendable
    @inlinable
    public func startModelPackagingJob(_ input: StartModelPackagingJobRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartModelPackagingJobResponse {
        try await self.client.execute(
            operation: "StartModelPackagingJob", 
            path: "/2020-11-20/projects/{ProjectName}/modelpackagingjobs", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Starts an Amazon Lookout for Vision model packaging job. A model packaging job creates an AWS IoT Greengrass component for a Lookout for Vision model. You can use the component to deploy your model to an edge device managed by Greengrass.
    ///  Use the DescribeModelPackagingJob API to determine the current status of the job.  The model packaging job is complete if the value of Status is SUCCEEDED. To deploy the component to the target device, use the component name and component version with the AWS IoT Greengrass CreateDeployment API. This operation requires the following permissions:    lookoutvision:StartModelPackagingJob     s3:PutObject     s3:GetBucketLocation     kms:GenerateDataKey     greengrass:CreateComponentVersion     greengrass:DescribeComponent    (Optional) greengrass:TagResource. Only required if you want to tag the component.   For more information, see  Using your Amazon Lookout for Vision model on an edge device in the  Amazon Lookout for Vision Developer Guide.
    ///
    /// Parameters:
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to StartModelPackagingJob completes only once.  You choose the value to pass. For example, An issue might prevent you from getting a response from StartModelPackagingJob. In this case, safely retry your call to StartModelPackagingJob by using the same ClientToken parameter value. If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from making multiple dataset creation requests. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to StartModelPackagingJob. An idempotency token is active for 8 hours.
    ///   - configuration: The configuration for the model packaging job.
    ///   - description: A description for the model packaging job.
    ///   - jobName: A name for the model packaging job. If you don't supply a value, the service creates a job name for you.
    ///   - modelVersion: The version of the model within the project that you want to package.
    ///   - projectName: The name of the project which contains the version of the model that you want to package.
    ///   - logger: Logger use during operation
    @inlinable
    public func startModelPackagingJob(
        clientToken: String? = StartModelPackagingJobRequest.idempotencyToken(),
        configuration: ModelPackagingConfiguration? = nil,
        description: String? = nil,
        jobName: String? = nil,
        modelVersion: String? = nil,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartModelPackagingJobResponse {
        let input = StartModelPackagingJobRequest(
            clientToken: clientToken, 
            configuration: configuration, 
            description: description, 
            jobName: jobName, 
            modelVersion: modelVersion, 
            projectName: projectName
        )
        return try await self.startModelPackagingJob(input, logger: logger)
    }

    /// Stops the hosting of a running model. The operation might take a while to complete. To check the current status, call DescribeModel.  After the model hosting stops, the Status of the model is TRAINED. This operation requires permissions to perform the lookoutvision:StopModel operation.
    @Sendable
    @inlinable
    public func stopModel(_ input: StopModelRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StopModelResponse {
        try await self.client.execute(
            operation: "StopModel", 
            path: "/2020-11-20/projects/{ProjectName}/models/{ModelVersion}/stop", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Stops the hosting of a running model. The operation might take a while to complete. To check the current status, call DescribeModel.  After the model hosting stops, the Status of the model is TRAINED. This operation requires permissions to perform the lookoutvision:StopModel operation.
    ///
    /// Parameters:
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to StopModel completes only once.  You choose the value to pass. For example, An issue  might prevent you from getting a response from StopModel. In this case, safely retry your call to StopModel by using the same ClientToken parameter value. If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from making multiple stop requests. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to StopModel. An idempotency token is active for 8 hours.
    ///   - modelVersion: The version of the model that you want to stop.
    ///   - projectName: The name of the project that contains the model that you want to stop.
    ///   - logger: Logger use during operation
    @inlinable
    public func stopModel(
        clientToken: String? = StopModelRequest.idempotencyToken(),
        modelVersion: String,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StopModelResponse {
        let input = StopModelRequest(
            clientToken: clientToken, 
            modelVersion: modelVersion, 
            projectName: projectName
        )
        return try await self.stopModel(input, logger: logger)
    }

    /// Adds one or more key-value tags to an Amazon Lookout for Vision model.  For more information, see Tagging a model in the Amazon Lookout for Vision Developer Guide.  This operation requires permissions to perform the lookoutvision:TagResource operation.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/2020-11-20/tags/{ResourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds one or more key-value tags to an Amazon Lookout for Vision model.  For more information, see Tagging a model in the Amazon Lookout for Vision Developer Guide.  This operation requires permissions to perform the lookoutvision:TagResource operation.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the model to assign the tags.
    ///   - tags: The key-value tags to assign to the model.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes one or more tags from an Amazon Lookout for Vision model. For more information, see  Tagging a model in the Amazon Lookout for Vision Developer Guide.  This operation requires permissions to perform the lookoutvision:UntagResource operation.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/2020-11-20/tags/{ResourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes one or more tags from an Amazon Lookout for Vision model. For more information, see  Tagging a model in the Amazon Lookout for Vision Developer Guide.  This operation requires permissions to perform the lookoutvision:UntagResource operation.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the model from which you want to remove tags.
    ///   - tagKeys: A list of the keys of the tags that you want to remove.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Adds or updates one or more JSON Line entries in a dataset. A JSON Line includes information about an image used for training or testing an Amazon Lookout for Vision model. To update an existing JSON Line, use the source-ref field to identify the JSON Line. The JSON line that you supply replaces the existing JSON line. Any existing annotations that are not in the new JSON line are removed from the dataset.  For more information, see  Defining JSON lines for anomaly classification in the  Amazon Lookout for Vision Developer Guide.   The images you reference in the source-ref field of a JSON line, must be  in the same S3 bucket as the existing images in the dataset.   Updating a dataset might take a while to complete. To check the current status, call DescribeDataset and check the Status field in the response. This operation requires permissions to perform the lookoutvision:UpdateDatasetEntries operation.
    @Sendable
    @inlinable
    public func updateDatasetEntries(_ input: UpdateDatasetEntriesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateDatasetEntriesResponse {
        try await self.client.execute(
            operation: "UpdateDatasetEntries", 
            path: "/2020-11-20/projects/{ProjectName}/datasets/{DatasetType}/entries", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds or updates one or more JSON Line entries in a dataset. A JSON Line includes information about an image used for training or testing an Amazon Lookout for Vision model. To update an existing JSON Line, use the source-ref field to identify the JSON Line. The JSON line that you supply replaces the existing JSON line. Any existing annotations that are not in the new JSON line are removed from the dataset.  For more information, see  Defining JSON lines for anomaly classification in the  Amazon Lookout for Vision Developer Guide.   The images you reference in the source-ref field of a JSON line, must be  in the same S3 bucket as the existing images in the dataset.   Updating a dataset might take a while to complete. To check the current status, call DescribeDataset and check the Status field in the response. This operation requires permissions to perform the lookoutvision:UpdateDatasetEntries operation.
    ///
    /// Parameters:
    ///   - changes: The entries to add to the dataset.
    ///   - clientToken: ClientToken is an idempotency token that ensures a call to UpdateDatasetEntries completes only once.  You choose the value to pass. For example, An issue  might prevent you from getting a response from UpdateDatasetEntries. In this case, safely retry your call to UpdateDatasetEntries by using the same ClientToken parameter value. If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you.  This prevents retries after a network error from making multiple updates with the same dataset entries. You'll need to provide your own value for other use cases.  An error occurs if the other input parameters are not the same as in the first request. Using a different   value for ClientToken is considered a new call to UpdateDatasetEntries. An idempotency token is active for 8 hours.
    ///   - datasetType: The type of the dataset that you want to update. Specify train to update the training dataset. Specify test to update the test dataset. If you have a single dataset project, specify train.
    ///   - projectName: The name of the project that contains the dataset that you want to update.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateDatasetEntries(
        changes: AWSBase64Data? = nil,
        clientToken: String? = UpdateDatasetEntriesRequest.idempotencyToken(),
        datasetType: String,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateDatasetEntriesResponse {
        let input = UpdateDatasetEntriesRequest(
            changes: changes, 
            clientToken: clientToken, 
            datasetType: datasetType, 
            projectName: projectName
        )
        return try await self.updateDatasetEntries(input, logger: logger)
    }
}

extension LookoutVision {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: LookoutVision, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension LookoutVision {
    /// Return PaginatorSequence for operation ``listDatasetEntries(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listDatasetEntriesPaginator(
        _ input: ListDatasetEntriesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDatasetEntriesRequest, ListDatasetEntriesResponse> {
        return .init(
            input: input,
            command: self.listDatasetEntries,
            inputKey: \ListDatasetEntriesRequest.nextToken,
            outputKey: \ListDatasetEntriesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDatasetEntries(_:logger:)``.
    ///
    /// - Parameters:
    ///   - afterCreationDate: Only includes entries after the specified date in the response. For example, 2020-06-23T00:00:00.
    ///   - anomalyClass: Specify normal to include only normal images. Specify anomaly to only include anomalous entries. If you don't specify a value, Amazon Lookout for Vision returns normal and anomalous images.
    ///   - beforeCreationDate: Only includes entries before the specified date in the response. For example, 2020-06-23T00:00:00.
    ///   - datasetType: The type of the dataset that you want to list.  Specify train to list  the training dataset. Specify test to list the test dataset. If you have a single dataset project, specify train.
    ///   - labeled: Specify true to include labeled entries, otherwise specify false. If you don't specify a value, Lookout for Vision returns all entries.
    ///   - maxResults: The maximum number of results to return per paginated call. The largest value you can specify is 100.  If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
    ///   - projectName: The name of the project that contains the dataset that you want to list.
    ///   - sourceRefContains: Perform a "contains" search on the  values of the source-ref key within the dataset.  For example a value of "IMG_17"  returns all JSON Lines where the source-ref key value matches *IMG_17*.
    ///   - logger: Logger used for logging
    @inlinable
    public func listDatasetEntriesPaginator(
        afterCreationDate: Date? = nil,
        anomalyClass: String? = nil,
        beforeCreationDate: Date? = nil,
        datasetType: String,
        labeled: Bool? = nil,
        maxResults: Int? = nil,
        projectName: String,
        sourceRefContains: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDatasetEntriesRequest, ListDatasetEntriesResponse> {
        let input = ListDatasetEntriesRequest(
            afterCreationDate: afterCreationDate, 
            anomalyClass: anomalyClass, 
            beforeCreationDate: beforeCreationDate, 
            datasetType: datasetType, 
            labeled: labeled, 
            maxResults: maxResults, 
            projectName: projectName, 
            sourceRefContains: sourceRefContains
        )
        return self.listDatasetEntriesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listModelPackagingJobs(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listModelPackagingJobsPaginator(
        _ input: ListModelPackagingJobsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListModelPackagingJobsRequest, ListModelPackagingJobsResponse> {
        return .init(
            input: input,
            command: self.listModelPackagingJobs,
            inputKey: \ListModelPackagingJobsRequest.nextToken,
            outputKey: \ListModelPackagingJobsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listModelPackagingJobs(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return per paginated call. The largest value you can specify is 100.  If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
    ///   - projectName: The name of the project for which you want to list the model packaging jobs.
    ///   - logger: Logger used for logging
    @inlinable
    public func listModelPackagingJobsPaginator(
        maxResults: Int? = nil,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListModelPackagingJobsRequest, ListModelPackagingJobsResponse> {
        let input = ListModelPackagingJobsRequest(
            maxResults: maxResults, 
            projectName: projectName
        )
        return self.listModelPackagingJobsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listModels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listModelsPaginator(
        _ input: ListModelsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListModelsRequest, ListModelsResponse> {
        return .init(
            input: input,
            command: self.listModels,
            inputKey: \ListModelsRequest.nextToken,
            outputKey: \ListModelsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listModels(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return per paginated call. The largest value you can specify is 100.  If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
    ///   - projectName: The name of the project that contains the model versions that you want to list.
    ///   - logger: Logger used for logging
    @inlinable
    public func listModelsPaginator(
        maxResults: Int? = nil,
        projectName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListModelsRequest, ListModelsResponse> {
        let input = ListModelsRequest(
            maxResults: maxResults, 
            projectName: projectName
        )
        return self.listModelsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listProjects(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listProjectsPaginator(
        _ input: ListProjectsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListProjectsRequest, ListProjectsResponse> {
        return .init(
            input: input,
            command: self.listProjects,
            inputKey: \ListProjectsRequest.nextToken,
            outputKey: \ListProjectsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listProjects(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results to return per paginated call. The largest value you can specify is 100.  If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
    ///   - logger: Logger used for logging
    @inlinable
    public func listProjectsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListProjectsRequest, ListProjectsResponse> {
        let input = ListProjectsRequest(
            maxResults: maxResults
        )
        return self.listProjectsPaginator(input, logger: logger)
    }
}

extension LookoutVision.ListDatasetEntriesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutVision.ListDatasetEntriesRequest {
        return .init(
            afterCreationDate: self.afterCreationDate,
            anomalyClass: self.anomalyClass,
            beforeCreationDate: self.beforeCreationDate,
            datasetType: self.datasetType,
            labeled: self.labeled,
            maxResults: self.maxResults,
            nextToken: token,
            projectName: self.projectName,
            sourceRefContains: self.sourceRefContains
        )
    }
}

extension LookoutVision.ListModelPackagingJobsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutVision.ListModelPackagingJobsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            projectName: self.projectName
        )
    }
}

extension LookoutVision.ListModelsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutVision.ListModelsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            projectName: self.projectName
        )
    }
}

extension LookoutVision.ListProjectsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> LookoutVision.ListProjectsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
